package com.ddwl.schema.bo.goods;

import com.ddwl.schema.bo.base.BaseBo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import java.math.BigDecimal;

/**
 * @author Fu Zhaohui
 * @version 1.0.0
 * @date 2019/8/28 16:36
 */
@ApiModel(description = "子商品Bo")
@Setter
@Getter
public class SkuBo extends BaseBo {

    @ApiModelProperty("子商品ID")
    private String id;
    @ApiModelProperty("商品ID")
    private String itemId;
    @ApiModelProperty("多规格商品描述信息")
    private String itemSpecs;
    @ApiModelProperty("媒体资料")
    private String imageUrl;
    @DecimalMin(value = "0.01",message = "零售价不能小于0.01")
    @DecimalMax(value = "10000000.00",message = "零售价不能大于10000000.00")
    @ApiModelProperty("零售价")
    private BigDecimal retailPrice;
    @ApiModelProperty("商品状态")
    private Integer skuStatus;
    @ApiModelProperty("商品编码")
    @Length(max = 32,message = "商品编码不能超过32位")
    private String barcode;
    @ApiModelProperty("库存")
    private Integer stock;
    @DecimalMin(value = "0.01",message = "优惠价不能小于0.01")
    @DecimalMax(value = "10000000.00",message = "优惠价不能大于10000000.00")
    @ApiModelProperty("优惠价")
    private BigDecimal factoryPrice;
    @ApiModelProperty("sku预估佣金")
    private BigDecimal itemCommission;
    @ApiModelProperty("秒杀锁定数量")
    private Integer lockStock;
}
